public class Test {
    public static void main(String[] args) {
        LinkedList list = new LinkedList();
        //打印
        list.addLast(5);
        list.addLast(7);
        list.addLast(7);
        list.display();

        list.addFirst(7);
        list.addFirst(3);
        list.addFirst(1);
        list.display();

        list.removeAllKey(7);
        list.display();
        System.out.println("===============");

        list.remove(1);
        list.display();

        list.remove(7);
        list.display();

        list.removeAllKey(7);
        list.display();

        list.addFirst(2);
        list.addFirst(9);
        list.display();
    }
}
